<?php
use think\facade\Route;

//轮播图
Route::group('banner',function (){
    //轮播图管理
    Route::post('Banner','web/Banner/index');
    //轮播图提添加
    Route::post('BannerUpload','web/Banner/upload');
})->middleware(\api\web\middleware\CheckToken::class);
//导航
Route::group('nav',function (){
    //导航查询
    Route::post('Nav','web/Nav/index');
    //导航编辑
    Route::post('NavUpdate','web/Nav/update');
})->middleware(\api\web\middleware\CheckToken::class);
//用户
Route::group('user',function(){
    //注册
    Route::post('register','web/User/register');
    //登录
    Route::post('sendSms','web/User/sendSms');
    //验证码
    Route::post('login','web/User/login');
    //个人信息查询
    Route::get('message','web/Message/getUserInfo');
    //个人信息修改
    Route::post('MessageUpdate','web/Message/updateInfo');
    //个人信息头像上传
    Route::post('upload','web/Message/upload');
    // 充值
    Route::post('addMoney', 'web/Money/addMoney');
    //查询流水
    Route::get('getmoney', 'web/Money/GetMoney');
})->middleware(\api\web\middleware\CheckToken::class);
//地址
Route::group('address',function (){
    //查询收货地址
    Route::post('address','web/User/address');
    //添加收货地址
    Route::post('addAddress','web/User/addAddress');
    //修改收货地址
    Route::post('updateAddress','web/User/UpdateAddress');
    //修改收货地址
    Route::post('deleteAddress','web/User/DeleteAddress');
})->middleware(\api\web\middleware\CheckToken::class);
// 支付
Route::group('order',function (){
    //创建订单
    Route::post('index','web/Order/order');
    //支付订单
    Route::post('pay','web/Pay/walletPay');
    //物流
    Route::post('wuLiu','web/Order/wuLiu');
})->middleware(\api\web\middleware\CheckToken::class);